package com.example.data0306.news;

import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.data0306.Adapter.CompetitionAdapter;
import com.example.data0306.Adapter.NewContentAdapter;
import com.example.data0306.R;
import com.example.data0306.base.BaseFragment;
import com.example.data0306.bean.NewsArticleBean;

public class CompetitionFragment extends BaseFragment {
    private RecyclerView nRecyclerView;
    private CompetitionAdapter nAdapter1;
    private NewContentAdapter nAdapter;

    @Override
    protected int rootLayout() {
        return R.layout.view_competition;
    }

    @Override
    protected int contentView() {
        return 0;
    }

    @Override
    protected void initView(View rootView) {
        nRecyclerView = rootView.findViewById(R.id.competition_recyclerView);
    }

    @Override
    protected void initData() {


        nAdapter = new NewContentAdapter();
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"峡谷晚报：大师兄马玉米成同事|Kakao秀爱妻婚纱照"));
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"腥红之月喜迎加强"));
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"云顶11.5男刀迎来加强 玉剑男刀十步一杀"));
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"【混分攻略】上单新晋混分巨兽——不灭狂雷"));
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"涡轮人马成上分利器"));
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"魔切流飞机快速成型 版本三大强势中单推荐"));
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"LpL赛后视频，WE让二追三，击败OMG"));
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"【法圣】加强回归顶流，奇亚娜百穿百速流全方位大型攻略"));
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"风哥直播谈小虎"));
        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"tian韩服冲分顺利连胜 暂为FPX队内唯一千分选手"));
    }

    @Override
    protected void bindData() {
        super.bindData();
        nRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        nRecyclerView.setAdapter(nAdapter1);
        nRecyclerView.setAdapter(nAdapter);
    }

    @Override
    protected void bindEvent() {

    }
}

//public class CompetitionFragment {
//}
